<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <select id="city">
        <option value="">--请选择--</option>
        <option value="广州">广州</option>
        <option value="深圳">深圳</option>
    </select>

    <button class="get">操作城市</button>

    <script>
        document.querySelector('.get').addEventListener('click',function(){
            // 获取值
        //    let value =  document.querySelector('#city').value
        //    alert(value)

        // 选中值
        document.querySelector('#city').value = '深圳'
        })
    </script>
    
</body>
</html>